import request from '@/utils/request'
//公告首页公告列表
export function notice_list(page,limit,keyword,search_time) {
  return request({
    url: '/market/content/notice_list',
    method: 'get',
    params:{
      keyword,
      page,
      limit,
      search_time
    }
  })
}
//删除公告
export function notice_del(id) {
  return request({
    url: '/market/content/notice_del',
    method: 'get',
    params:{
      id,
    }
  })
}
//添加公告
export function notice_add(title,content,is_top,sort) {
  return request({
    url: '/market/content/notice_add',
    method: 'post',
    data:{
      title,
      content,
      is_top,
      sort
    }
  })
}
//公告详情
export function notice_detail(id) {
  return request({
    url: '/market/content/notice_detail',
    method: 'post',
    data:{
      id
    }
  })
}
//置顶
export function notice_top(id,is_top) {
  return request({
    url: '/market/content/notice_top',
    method: 'post',
    data:{
      id,
      is_top
    }
  })
}
//编辑公告
export function notice_edit(id,is_top,title,content,sort) {
  return request({
    url: '/market/content/notice_edit',
    method: 'post',
    data:{
      id,
      is_top,
      title,
      content,
      sort
    }
  })
}
